﻿using System;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using System.Web.UI;
using System.Reflection;

using Developmentalmadness.Web.UI.AjaxAbstractions;

namespace Developmentalmadness.Web.UI.ExtJsControlLibrary
{
    public class ExtJsMenuSeparator : ExtJsMenuBaseItem
    {
        public override IList<ScriptDescriptor> GetScriptDescriptors()
        {
            IList<ScriptDescriptor> list = base.GetScriptDescriptors();

            ScriptControlDescriptorBase desc = (ScriptControlDescriptorBase)list[0];

            desc.Type = "Ext.menu.Separator";

            if (!String.IsNullOrEmpty(itemCls))
                desc.AddPropertyBase("itemCls", String.Format("'{0}'", itemCls));

            return list;
        }

        public String itemCls { get; set; }
    }
}
